package com.hygj.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hygj.baseUtil.BaseDao;
import com.hygj.baseUtil.BaseServiceImpl;
import com.hygj.pojo.RandomOffice;
import com.hygj.service.RandomOfficeService;

@Service("randomOfficeService")
public class RandomOfficeServiceImpl extends BaseServiceImpl<RandomOffice> implements RandomOfficeService{
    
	@Resource(name="randomOfficeDao")
	@Override
	public void setDao(BaseDao<RandomOffice> dao) {
		super.setDao(dao);
	}

	@Override
	public List<RandomOffice> findRandomByName(String randomType) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("randomType", randomType);
		params.put("pageOffset", 0);
		params.put("pageSize", 20);
		return  listAll("page", params);
	}
}
